#! /usr/bin/python
    
def GetUniqueWords(text):
  alice = {}
  for word in text:
    if word in alice.keys():
      alice[word] += 1
    else:
      alice[word] = 1
  print alice 
  return alice

def main():
  # Open the file, read it into memory as a single string.
  with open('alice_in_wonderland.txt') as alice_file:
    alice_text = alice_file.read().strip("!?-./\\':;, ")
    alice_text = alice_text.lower().split()
    print 'Unique words:', len(GetUniqueWords(alice_text))


if __name__ == '__main__':
  main()
